<div class="am-modal am-modal-no-btn" tabindex="-1" id="edit_popup">
  <div class="am-modal-dialog">
    <div class="am-modal-hd">编辑用户
      <a href="javascript: void(0)" class="am-close am-close-spin" data-am-modal-close>&times;</a>
    </div>
{% if user %}
    <div class="tpl-block ">
        <div class="am-g tpl-amazeui-form">
            <div class="am-u-sm-12 am-u-md-9">
                <form class="am-form am-form-horizontal" method="post" action="{{ url_for("admin.profile", user_id=user.id, next=request.full_path) }}">
                    {{ form.csrf_token }}
                    <div class="am-form-group">
                        <label for="user-name" class="am-u-sm-3 am-form-label">用户名 / Username</label>
                        <div class="am-u-sm-9">
                            {{ form.username }}
                        </div>
                    </div>

                    <div class="am-form-group">
                        <label for="user-email" class="am-u-sm-3 am-form-label">邮箱 / Email</label>
                        <div class="am-u-sm-9">
                            {{ form.email }}
                        </div>
                    </div>

                    <div class="am-form-group">
                        <label for="user-email" class="am-u-sm-3 am-form-label">密码 / Password</label>
                        <div class="am-u-sm-9">
                            {{ form.password }}
                        </div>
                    </div>

                    <div class="am-form-group">
                        <div class="am-u-sm-9 am-u-sm-push-3">
                            {{ form.submit(class="am-btn am-btn-primary") }}
                        </div>
                    </div>
                </form>
            </div>
        </div>
    </div>
  </div>
</div>
{% else %}
    无用户参数
{% endif%}
